<template>
  <div id="app">
    <el-container>
      <el-header>TMS智慧物流管理系统</el-header>
      <el-container>
        <el-aside width="220px">
          <el-row class="tac">
            <el-col :span="24">
              <el-menu
                router
                :default-active="$router.path"
                class="el-menu-vetical-demo"
                @open="handleOpen"
                @close="handleClose"
              >
                <el-menu-item index="1">
                  <i class="el-icon-s-home"></i>
                  <span slot="title">首页</span>
                </el-menu-item>
                <el-submenu index="2">
                  <template slot="title">
                    <i class="el-icon-s-custom"></i>
                    <span slot="title">结算</span>
                  </template>
                  <el-menu-item-group>
                    <el-menu-item index="/Show/Collect_Fee">应收费管理</el-menu-item>
                    <el-menu-item index="/Show/Paying_User">应付费管理</el-menu-item>
                  </el-menu-item-group>
                </el-submenu>
                <el-submenu index="3">
                  <template slot="title">
                    <i class="el-icon-s-cooperation"></i>
                    <span slot="title">物资</span>
                  </template>
                  <el-menu-item-group>
                    <el-menu-item index="/Show/Cargo_Information">物资采购</el-menu-item>
                    <el-menu-item index="/Show/Materials_Company">入库管理</el-menu-item>
                    <el-menu-item index="/Show/Goods_Receiving">物资领用</el-menu-item>
                    <el-menu-item index="/Show/Statistical_Goods">物资统计</el-menu-item>
                  </el-menu-item-group>
                </el-submenu>
                <el-submenu index="4">
                  <template slot="title">
                    <i class="el-icon-tickets"></i>
                    <span slot="title">审批</span>
                  </template>
                  <el-menu-item-group>
                    <el-menu-item index="/Show/CargoApproval">物资采购审批</el-menu-item>
                    <el-menu-item index="/Show/GoodsApproval">物资领用审批</el-menu-item>
                  </el-menu-item-group>
                </el-submenu>
              </el-menu>
            </el-col>
          </el-row>
        </el-aside>
        <el-main>
          <router-view> </router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  name: "App",
  data() {
    return {
      isCollapse: true,
    };
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>

<style>
/* #app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
} */
.el-header,
.el-footer {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #d3dce6;
  color: #333;
  text-align: center;
  line-height: 200px;
}

.el-main {
  background-color: #e9f3f1;
  color: #333;
  text-align: center;
  line-height: 10px;
}

body > .el-container {
  margin-bottom: 50px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}

.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 200px;
  min-height: 200px;
}


</style>
